

#include "memory.h"

//define a new that uses a parameterised allocator. in theory, this should throw on error but it doesn't 'cause that'd
//require dragging in the special "no throw new" type from the compilers crt.
void* operator new(size_t sz, Allocator* pAlloc)
{
	return pAlloc->allocate(sz);
}

void* operator new(size_t sz, Allocator& pAlloc)
{
	return pAlloc.allocate(sz);
}